import api from "./index";

// 订单相关接口
export default {
  // 创建订单
  createOrder: (params) => api.post("/system/order/createOrder", params),
  // 订单列表
  getOrderList: (params) => api.get("/system/order/listByUser", params),
  // 订单详情
  getOrderDetail: (params) => api.get("/system/order/orderDetails", params),
  // 订单退单
  chargeback: (params) => api.get("/system/order/chargeback", params),
  // 商品评论
  createComment: (params) => api.post("/applet/comment", params),
  // 确认收货
  receivingGoods: (params) => api.get("/system/order/receivingGoods", params),
  // 取消订单
  cancelOrder: (params) => api.get("/system/order/cancelOrder", params),
  // 查看物流
  getOrderLogistics: (params) => api.get("/system/order/getOrderPhysicalDistribution", params),
  // 退货详情
  getSalesReturnDetail: (params) => api.get("/applet/shipments/list", params),
  // 撤销退货
  cancelRefund: (params) => api.get("/system/order/cancelRefund", params),
};
